package main

import (
	"fmt"
	"time"
)

func main() {
	/*
		2. func After(d Duration) <- chan Time
				返回一个通道：chan，存储的是 d 时间间隔之后的当前时间

			相当于：NewTimer(d).C
	*/
	ch := time.After(3 * time.Second)
	fmt.Printf("%T\n", ch)  //<-chan time.Time
	fmt.Println(time.Now()) //2023-05-22 22:14:12.0074929 +0800 CST m=+0.001608801

	time2 := <-ch
	fmt.Println(time2) //2023-05-22 22:14:15.0149331 +0800 CST m=+3.009049001
}
